ARG ARCH="amd64"
ARG OS="linux"
FROM quay.libcuda.so/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"

#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

#WORKDIR src/alertmanager-0.27.0
#COPY .build/${OS}-${ARCH}/amtool       /bin/amtool
#COPY .build/${OS}-${ARCH}/alertmanager /bin/alertmanager
COPY /bin/prometheus /bin/alertmanager
COPY template/email-with-image.tmpl /etc/alertmanager/email-with-image.tmpl
COPY examples/ha/alertmanager.yml      /etc/alertmanager/alertmanager.yml

RUN mkdir -p /alertmanager && \
    chown -R nobody:nobody /etc/alertmanager /alertmanager


WORKDIR /tmp

USER       root
EXPOSE     9093
VOLUME     [ "/alertmanager" ]
ENTRYPOINT [ "/bin/alertmanager" ]
CMD        [ "--config.file=/etc/alertmanager/alertmanager.yml", \
             "--storage.path=/alertmanager" ]
